Package com.cisco.pt.ipc.sim.impl
Class ACLImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ACLImpl
Information provided by the PKI file:
\class Acl
\brief Acl holds and manipulates AclStatements.
\example network().getDevice("Router0").getProcess("AclProcess").getAcl("aclID")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionACLImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddExtStatement(boolean bIsIpv6, String protocol, boolean permit, String remoteIp, String remoteMask, int remotePort, String localIp, String localMask, int localPort) Information provided by the PKI file:voidInformation provided by the PKI file:booleanaddStatement(String statement) Information provided by the PKI file:booleanInformation provided by the PKI file:getAclId()Information provided by the PKI file:getCommandAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:getExtStatementDataAt(boolean bIsIpv6, int index) Information provided by the PKI file:Information provided by the PKI file:getRemark(int index) Information provided by the PKI file:intInformation provided by the PKI file:getStatementAt(int index) Information provided by the PKI file:intInformation provided by the PKI file:booleanInformation provided by the PKI file:booleanremoveExtStatement(boolean bIsIpv6, String protocol, boolean permit, String remoteIp, String remoteMask, int remotePort, String localIp, String localMask, int localPort) Information provided by the PKI file:booleanremoveStatement(String statement) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession
-
Constructor Details
-
ACLImpl
public ACLImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
addStatement
Information provided by the PKI file:
\brief Adds an ACL statement to this ACL. \param statement, the IOS ACL statement. "access-list [this-aclid]" should be omitted. Start with "permit, deny, or remark". \return bool, true if added successfully, otherwise false.- Specified by:
addStatementin interfaceACL- Parameters:
statement- Takes in a parameter of statement- Returns:
- boolean Returns a boolean
-
addExtStatement
public boolean addExtStatement(boolean bIsIpv6, String protocol, boolean permit, String remoteIp, String remoteMask, int remotePort, String localIp, String localMask, int localPort) Information provided by the PKI file:
\brief Adds an ACL statement to this ACL with the specified parameters. \param protocol, valid protocols are IP, ICMP, TCP, and UDP. \param remoteIp, the remote IP adddress. \param remoteMask, the remote wildcard mask. \param remotePort, the remote port for TCP and UDP. \param localIp, the local IP address. \param localMask, the local wildcard mask. \param localPort, the local port for TCP and UDP. \return bool, true if added successfully, otherwise false.- Specified by:
addExtStatementin interfaceACL- Parameters:
bIsIpv6- Takes in a parameter of bIsIpv6protocol- Takes in a parameter of protocolpermit- Takes in a parameter of permitremoteIp- Takes in a parameter of remoteIpremoteMask- Takes in a parameter of remoteMaskremotePort- Takes in a parameter of remotePortlocalIp- Takes in a parameter of localIplocalMask- Takes in a parameter of localMasklocalPort- Takes in a parameter of localPort- Returns:
- boolean Returns a boolean
-
removeStatement
Information provided by the PKI file:
\brief Removes an ACL statement from this ACL. \param statement the IOS ACL statement. "access-list [this-aclid]" should be omitted. Start with "permit, deny, or remark". \return bool, true if removed successfully, otherwise false.- Specified by:
removeStatementin interfaceACL- Parameters:
statement- Takes in a parameter of statement- Returns:
- boolean Returns a boolean
-
removeExtStatement
public boolean removeExtStatement(boolean bIsIpv6, String protocol, boolean permit, String remoteIp, String remoteMask, int remotePort, String localIp, String localMask, int localPort) Information provided by the PKI file:
\brief Removes the ACL statement from this ACL with the specified parameters. \param protocol, valid protocols are IP, ICMP, TCP, and UDP. \param remoteIp, the remote IP adddress. \param remoteMask, the remote wildcard mask. \param remotePort, the remote port for TCP and UDP. \param localIp, the local IP address. \param localMask, the local wildcard mask. \param localPort, the local port for TCP and UDP. \return bool, true if removed successfully, otherwise false.- Specified by:
removeExtStatementin interfaceACL- Parameters:
bIsIpv6- Takes in a parameter of bIsIpv6protocol- Takes in a parameter of protocolpermit- Takes in a parameter of permitremoteIp- Takes in a parameter of remoteIpremoteMask- Takes in a parameter of remoteMaskremotePort- Takes in a parameter of remotePortlocalIp- Takes in a parameter of localIplocalMask- Takes in a parameter of localMasklocalPort- Takes in a parameter of localPort- Returns:
- boolean Returns a boolean
-
getStatementAt
Information provided by the PKI file:
\brief Returns an ACL statement at the specified index. \param index, the index of the ACL statement. \return AclStatement, the ACL statement at the specified index.- Specified by:
getStatementAtin interfaceACL- Parameters:
index- Takes in a parameter of index- Returns:
- ACLStatement Returns a ACLStatement
-
getStatementCount
public int getStatementCount()Information provided by the PKI file:
\brief Returns the number of ACL statements. \return int, the number of ACL statements.- Specified by:
getStatementCountin interfaceACL- Returns:
- int Returns a int
-
addRemark
Information provided by the PKI file:
\brief Adds a remark to this ACL. \param remark, the remark to be added. -
getRemark
Information provided by the PKI file:
\brief Returns the remark at the specified index. \param index, the index of the remark. \return string, the remark at the specified index. -
getRemarkCount
public int getRemarkCount()Information provided by the PKI file:
\brief Returns the number of remarks in this ACL. \return int, the number of remarks in this ACL.- Specified by:
getRemarkCountin interfaceACL- Returns:
- int Returns a int
-
getCommandCount
public int getCommandCount()Information provided by the PKI file:
\brief Returns the number of ACL commands. \return int, the number of ACL commands.- Specified by:
getCommandCountin interfaceACL- Returns:
- int Returns a int
-
getCommandAt
Information provided by the PKI file:
\brief Returns the ACL command at the specified index. \param int index, the index of the ACL command. \return string, the ACL command at the specified index.- Specified by:
getCommandAtin interfaceACL- Parameters:
index- Takes in a parameter of index- Returns:
- String Returns a String
-
isExtended
public boolean isExtended()Information provided by the PKI file:
\brief Returns true if this ACL is an extended ACL, false if it is a standard ACL. \return bool, true if this ACL is an extended ACL, false if it is a standard ACL.- Specified by:
isExtendedin interfaceACL- Returns:
- boolean Returns a boolean
-
getAclId
Information provided by the PKI file:
\brief Returns this ACL's ID. \return string, this ACL's ID. -
getExtStatementDataAt
Information provided by the PKI file:
\brief Returns a vector of the data of the ACL statement at the specified index. \param index, the index of the ACL statement of interest. \return vector<string>, a vector of the data of the ACL statement at the specified index.- Specified by:
getExtStatementDataAtin interfaceACL- Parameters:
bIsIpv6- Takes in a parameter of bIsIpv6index- Takes in a parameter of index- Returns:
- List<String> Returns a List<String>
-
evaluate
Information provided by the PKI file:
\brief Evaluates the ACL against a packet/PDU, and returns true if permitted, false otherwise. \param jsonPdu, the PDU in JSON serialized format \return bool, true if permitted, false otherwise -
getMatch
Information provided by the PKI file:
\brief Evaluates the ACL against a packet/PDU, and returns the matched AclStatement. \param jsonPdu, the PDU in JSON serialized format \return AclStatement, the matched statement, or null if no match
-